package com.cloud.elm.mapper;

import com.cloud.elm.po.Business;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface BusinessMapper {

	@Select("select * from business where orderTypeId=#{orderTypeId} order by businessId")
	public List<Business> listBusinessByOrderTypeId(Integer orderTypeId);
	
	@Select("select * from business where businessId=#{businessId}")
	public Business getBusinessById(String businessId);

	@Update("update business set businessName = #{userName}, businessImg = #{userImg} where businessId = #{userId}")
    void updateBusinessById(String userId, String userName, String userImg);

//	@Select("select password from business where businessId = #{businessId}")
//    String getPasswordByBusinessId(Integer businessId);

//	@Update("update business set password = #{newPassword} where businessId = #{businessId}")
//	void updatePwd(Integer businessId, String newPassword);
}
